#include <iostream>
#include <xcommonglobal.h>
#include <xtcpserver.h>
#include <connect_server_impl.h>
#include <xsocketapi.h>
using namespace std;
using namespace zdh;
void Init()
{
	ICommonGlobal * pCommonGlobal = ICommonGlobal::getInstance();
	pCommonGlobal->getLogConfig()->setConsoleOut(true);
	pCommonGlobal->getLogConfig()->setFileOut(false);
	pCommonGlobal->getLogConfig()->setLevel(LOG_LEVEL_TRACE);
	pCommonGlobal->getLogConfig()->setShortDateTimeFormat(true);

	pCommonGlobal->Init();
	XSocketAPI::SocketInit();
}
int main(int argc, char * argv[])
{

	Init();
	Log->Info("Server Start Now...");
	XNAT_TCPServer_Impl Server;
	Server.Init();
	Server.Start();
	Server.Wait();

	system("pause");
	return 0;
}